how to use openvpn on centos7¶
server on centos7
yum -y install openvpn iptables-services openvpn --genkey --secret static.key iptables -F iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE service iptables save echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf && sysctl -p openvpn --config server.opvn --deamoncat server.ovpn
dev tun ifconfig 10.8.0.1 10.8.0.2 secret static.keyclient on windows10
gc client.ovpn
remote myRemoteIp dev tun ifconfig 10.8.0.2 10.8.0.1 secret static.key redirect-gateway def1 dhcp-option DNS 10.8.0.1references: